<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>eventTargetTester (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">events.eventTargetTester</span>
</div>

<hr/>


  <h2>Classes</h2>
   
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>



<h2>Enumerations</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.events.eventTargetTester.KeyType"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">KeyType</span>
        : 
     </div>


     <div class="entryOverview">
       The type of key returned by key-returning functions (listen).

     </div>

     <div class="entryDetails">
       <div class="detailsSection">
          <b>Constants:</b>
          <table class="horiz-rule">
            <tbody>
              <tr><td>
                <span class="entryName">
                  NUMBER
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  UNDEFINED
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
           </tbody>
         </table>
       </div>
     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_events_eventtargettester.js.source.html#line122">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>




  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.events.eventTargetTester.setUp"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">setUp<span class="args">(<span class="arg">listenableFactoryFn</span>,&nbsp;<span class="arg">listenFn</span>,&nbsp;<span class="arg">unlistenFn</span>,&nbsp;<span class="arg">unlistenByKeyFn</span>,&nbsp;<span class="arg">listenOnceFn</span>,&nbsp;<span class="arg">dispatchEventFn</span>,&nbsp;<span class="arg">removeAllFn</span>,&nbsp;<span class="arg">getListenersFn</span>,&nbsp;<span class="arg">getListenerFn</span>,&nbsp;<span class="arg">hasListenerFn</span>,&nbsp;<span class="arg">listenKeyType</span>,&nbsp;<span class="arg">unlistenFnReturnType</span>,&nbsp;<span class="arg">objectListenerSupported</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Setup step for the test functions. This needs to be called from the
test setUp.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">listenableFactoryFn</span>
        : <span class="type">function():!goog.events.Listenable</span>
        <div class="entryOverview">Function
    that will return a new Listenable instance each time it is called.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">listenFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Function that, given the same signature
    as goog.events.listen, will add listener to the given event
    target.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">unlistenFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Function that, given the same
    signature as goog.events.unlisten, will remove listener from
    the given event target.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">unlistenByKeyFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Function that, given 2
    parameters: src and key, will remove the corresponding
    listener.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">listenOnceFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Function that, given the same
    signature as goog.events.listenOnce, will add a one-time
    listener to the given event target.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">dispatchEventFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Function that, given the same
    signature as goog.events.dispatchEvent, will dispatch the event
    on the given event target.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">removeAllFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Function that, given the same
    signature as goog.events.removeAll, will remove all listeners
    according to the contract of goog.events.removeAll.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">getListenersFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Function that, given the same
    signature as goog.events.getListeners, will retrieve listeners.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">getListenerFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Function that, given the same
    signature as goog.events.getListener, will retrieve the
    listener object.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">hasListenerFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Function that, given the same
    signature as goog.events.hasListener, will determine whether
    listeners exist.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">listenKeyType</span>
        : <span class="type">goog.events.eventTargetTester.KeyType</span>
        <div class="entryOverview">The
    key type returned by listen call.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">unlistenFnReturnType</span>
        : <span class="type">goog.events.eventTargetTester.UnlistenReturnType</span>
        <div class="entryOverview">Whether we should check return value from
    unlisten call. If unlisten does not return a value, this should
    be set to false.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">objectListenerSupported</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
        <div class="entryOverview">Whether listener of type
    Object is supported.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_events_eventtargettester.js.source.html#line75">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.events.eventTargetTester.tearDown"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">tearDown<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Teardown step for the test functions. This needs to be called from
test teardown.

     </div>

   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_events_eventtargettester.js.source.html#line111">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



  <h2>Global Properties</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.events.eventTargetTester.ALREADY_CHECKED_PROP"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">ALREADY_CHECKED_PROP</span>
        : 
     </div>


     <div class="entryOverview">
       Expando property used on "listener" function to determine if a
listener has already been checked. This is what allows us to
implement assertNoOtherListenerIsCalled.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_events_eventtargettester.js.source.html#line157">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.events.eventTargetTester.MAX_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">MAX_</span>
        : 
     </div>


     <div class="entryOverview">
       The maximum number of initialized event targets (in eventTargets
array) and listeners (in listeners array).

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_events_eventtargettester.js.source.html#line175">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.events.eventTargetTester.NUM_CALLED_PROP"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">NUM_CALLED_PROP</span>
        : 
     </div>


     <div class="entryOverview">
       Expando property used on "listener" function to record the number
of times it has been called the last time assertListenerIsCalled is
done. This allows us to verify that it has not been called more
times in assertNoOtherListenerIsCalled.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_events_eventtargettester.js.source.html#line166">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.events.eventTargetTester.UnlistenReturnType"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.events.eventTargetTester.</span><span class="entryName">UnlistenReturnType</span>
        : 
     </div>


     <div class="entryOverview">
       The type of unlisten function's return value.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_events_eventtargettester.js.source.html#line138">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package events</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="events.eventTargetTester"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
